import 'package:flutter/material.dart';
import './fonts.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Material App',
      home: Scaffold(
        appBar: AppBar(
          title: const Text('新闻图文列表'),
        ),
        body: const MyHomePage(),
      ),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return ListView(
      padding: const EdgeInsets.fromLTRB(0, 10, 0, 10),
      children: <Widget>[
        ListTile(
          title: const Text(
            '我是新闻列表',
            maxLines: 1,
            overflow: TextOverflow.ellipsis,
          ),
          subtitle: const Text(
            '我是新闻列表描述我是新闻列表描述我是新闻列表描述我是新闻列表描述我是新闻列表描述我是新闻列表描述',
            maxLines: 2,
            overflow: TextOverflow.ellipsis,
          ),
          trailing: Image.network(
              "https://www.fengmap.com/uploads/allimg/20230419/1-2304191U93C24.jpg"),
        ),
        const Divider(),
        ListTile(
          leading: Image.network(
              "https://www.fengmap.com/uploads/allimg/20230419/1-2304191U93C24.jpg"),
          title: const Text(
            '我是新闻列表',
            maxLines: 1,
            overflow: TextOverflow.ellipsis,
          ),
          subtitle: const Text(
            '我是新闻列表描述我是新闻列表描述我是新闻列表描述我是新闻列表描述我是新闻列表描述我是新闻列表描述',
            maxLines: 2,
            overflow: TextOverflow.ellipsis,
          ),
          trailing: Icon(Icons.chevron_right),
        ),
        const Divider(),
        ListTile(
          leading: Image.network(
              "https://www.fengmap.com/uploads/allimg/20230419/1-2304191U93C24.jpg"),
          title: const Text(
            '我是新闻列表',
            maxLines: 1,
            overflow: TextOverflow.ellipsis,
          ),
          subtitle: const Text(
            '我是新闻列表描述我是新闻列表描述我是新闻列表描述我是新闻列表描述我是新闻列表描述我是新闻列表描述',
            maxLines: 2,
            overflow: TextOverflow.ellipsis,
          ),
          trailing: Icon(Icons.chevron_right),
        ),
        const Divider(),
      ],
    );
  }
}
